CentOS 6
Sponsored Link

OpenStack Icehouse : Configure Ceilometer#2
2015/02/03
 
Configure OpenStack Metering Service (Ceilometer).
This example shows to install Metering Services on the existing environment like follows.
For example, install and configure Metering Services on the Network Node.
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |            |            |    [ Network Node ]    |
|     Keystone     |10.0.0.30   |   10.0.0.50|    DHCP,L3,L2 Agent    |
|      Glance      |------------+------------|     Metadata Agent     |
|     Nova API     |eth0        |        eth0|   Ceilometer Services  |
|  Neutron Server  |            |            |                        |
+------------------+            |            +------------------------+
                            eth0|10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |    Nova Compute    |
                      |      L2 Agent      |
                      | Ceilometer-Compute |
                      +--------------------+

 
Install and Configure Ceilometer on this section.
[1] Install MongoDB which Ceilometer needs for backend database.
# install from EPEL

[root@network ~]#
yum --enablerepo=epel -y install mongodb-server mongodb
[2] Configure and Start MongoDB.
[root@network ~]#
vi /etc/sysconfig/mongod
# add

OPTIONS="
--smallfiles
--quiet -f /etc/mongodb.conf"
[root@network ~]#
vi /etc/mongodb.conf
# line 4: change to the own IP

bind_ip =
10.0.0.50
[root@network ~]#
/etc/rc.d/init.d/mongod start

Starting mongod: [ OK ]
[root@network ~]#
chkconfig mongod on

# create a DB for Ceilometer (set any password for "password" section)

[root@network ~]#
mongo --host 10.0.0.50 --eval '
db = db.getSiblingDB("ceilometer");
db.addUser({user: "ceilometer",
pwd: "password",
roles: [ "readWrite", "dbAdmin" ]})'

MongoDB shell version: 2.4.12
connecting to: 10.0.0.50:27017/test
{
        "user" : "ceilometer",
        "pwd" : "c3f1480e5fb171fed77480ec8a9c1a7f",
        "roles" : [
                "readWrite",
                "dbAdmin"
        ],
        "_id" : ObjectId("54d20f1b01634b735987ba14")
}
[3] Install Ceilometer services.
# install from RDO, EPEL

[root@network ~]#
yum --enablerepo=openstack-icehouse,epel -y install openstack-ceilometer-api openstack-ceilometer-collector openstack-ceilometer-notification openstack-ceilometer-central openstack-ceilometer-alarm python-ceilometerclient
[4] Configure Ceilometer.
[root@network ~]#
mv /etc/ceilometer/ceilometer.conf /etc/ceilometer/ceilometer.conf.org

[root@network ~]#
vi /etc/ceilometer/ceilometer.conf
# create new

[DEFAULT]
# RabbitMQ server

rabbit_host=10.0.0.30
rabbit_port=5672
# RabbitMQ userID

rabbit_userid=guest
# RabbitMQ userID's password

rabbit_password=password
rpc_backend=ceilometer.openstack.common.rpc.impl_kombu
api_paste_config=/etc/ceilometer/api_paste.ini
libvirt_type=kvm
log_dir=/var/log/ceilometer
[api]
port=8777
host=0.0.0.0
# connection info for MongoDB

[database]
connection=mongodb://ceilometer:password@10.0.0.50:27017/ceilometer
# connection info for Keystone

[keystone_authtoken]
auth_host=10.0.0.30
auth_port=35357
auth_protocol=http
auth_uri=http://10.0.0.30:5000/v2.0
admin_user=ceilometer
admin_password=servicepassword
admin_tenant_name=service
# set the secret key which is shared among nodes.(set any words you like)

[publisher]
metering_secret=meteringsecret
# authentication info for Ceilometer

[service_credentials]
os_username=ceilometer
os_password=servicepassword
os_tenant_name=service
os_auth_url=http://10.0.0.30:35357/v2.0
[root@network ~]#
chgrp ceilometer /etc/ceilometer/ceilometer.conf

[root@network ~]#
chmod 640 /etc/ceilometer/ceilometer.conf

[root@network ~]#
for service in api central collector notification alarm-notifier alarm-evaluator
do
/etc/rc.d/init.d/openstack-ceilometer-$service start
chkconfig openstack-ceilometer-$service on
done

Starting openstack-ceilometer-api:                         [  OK  ]
Starting openstack-ceilometer-central:                     [  OK  ]
Starting openstack-ceilometer-collector:                   [  OK  ]
Starting openstack-ceilometer-agent-notification:          [  OK  ]
Starting openstack-ceilometer-alarm-notifier:              [  OK  ]
Starting openstack-ceilometer-alarm-evaluator:             [  OK  ]
 
Tweet